<template>
	<satri-page :padding="20">
		<satri-card label="基础用法">
			<satri-checkbox-group v-model="v0">
				<satri-checkbox label="1">炸鸡</satri-checkbox>
				<satri-checkbox label="2">汉堡</satri-checkbox>
				<satri-checkbox label="3">薯条</satri-checkbox>
			</satri-checkbox-group>
		</satri-card>

		<satri-card label="圆角">
			<satri-checkbox-group v-model="v1" round>
				<satri-checkbox label="1">炸鸡</satri-checkbox>
				<satri-checkbox label="2">汉堡</satri-checkbox>
			</satri-checkbox-group>
		</satri-card>

		<satri-card label="禁用">
			<satri-checkbox-group v-model="v2">
				<satri-checkbox label="1">炸鸡</satri-checkbox>
				<satri-checkbox disabled label="2">汉堡</satri-checkbox>
			</satri-checkbox-group>
		</satri-card>

		<satri-card label="开关">
			<satri-checkbox v-model="v3">已阅读并同意《用户协议》及《隐私政策》</satri-checkbox>
		</satri-card>

		<satri-card label="边框">
			<satri-checkbox-group v-model="v4">
				<satri-checkbox border label="1">炸鸡</satri-checkbox>
				<satri-checkbox border label="2">汉堡</satri-checkbox>
			</satri-checkbox-group>
		</satri-card>

		<satri-card label="边框填充">
			<satri-checkbox-group v-model="v5" fill border>
				<satri-checkbox label="1">
					<satri-text align="right" block>鸡米花（靠右）</satri-text>
				</satri-checkbox>
				<satri-checkbox label="2">可乐</satri-checkbox>
				<satri-checkbox label="3">蛋挞</satri-checkbox>
			</satri-checkbox-group>
		</satri-card>

		<satri-card label="只显示文字">
			<satri-checkbox-group v-model="v6" text border>
				<satri-checkbox label="1">炸鸡</satri-checkbox>
				<satri-checkbox label="2">汉堡</satri-checkbox>
			</satri-checkbox-group>
		</satri-card>

		<satri-card label="带背景">
			<satri-checkbox-group v-model="v6" text border bg>
				<satri-checkbox label="1">炸鸡</satri-checkbox>
				<satri-checkbox label="2">汉堡</satri-checkbox>
			</satri-checkbox-group>
		</satri-card>

		<satri-card label="边框圆角">
			<satri-checkbox-group v-model="v7" round border>
				<satri-checkbox label="1">炸鸡</satri-checkbox>
				<satri-checkbox label="2">汉堡</satri-checkbox>
			</satri-checkbox-group>
		</satri-card>

		<satri-card label="文字贼多">
			<satri-checkbox-group v-model="v8">
				<satri-checkbox label="1">
					汉堡、可乐、鸡肉卷、鸡排、鸡腿、蛋挞、薯条、鸡翅、原味鸡
				</satri-checkbox>

				<satri-checkbox label="2"> 鸡块、鸡米发、鸡腿堡 </satri-checkbox>
			</satri-checkbox-group>
		</satri-card>

		<satri-card label="自定义图标">
			<satri-checkbox-group v-model="v9">
				<satri-checkbox
					v-for="(item, index) in ['汉堡', '可乐', '薯条']"
					:key="index"
					:label="index"
				>
					<template #icon="{ checked }">
						<satri-icon
							name="like-fill"
							:size="36"
							:color="checked ? 'primary' : 'info'"
						/>
					</template>
					{{ item }}
				</satri-checkbox>
			</satri-checkbox-group>
		</satri-card>
	</satri-page>
</template>

<script lang="ts" setup>
import { ref } from "vue";

const v0 = ref(["1"]);
const v1 = ref(["2"]);
const v2 = ref([]);
const v3 = ref(true);
const v4 = ref(["1"]);
const v5 = ref(["1", "2"]);
const v6 = ref(["1", "2"]);
const v7 = ref(["1", "2"]);
const v8 = ref(["1", "2"]);
const v9 = ref([]);
</script>
